﻿using Kugar.Core.BaseStruct;
using Newtonsoft.Json.Linq;

namespace Kugar.Tool.DataSync.Server
{
    /// <summary>
    /// 导出的功能模块接口
    /// </summary>
    public interface IExporterPlugin
    {
        /// <summary>
        /// 导出函数,框架在接收到导出触发时,将调用该函数,传输数据
        /// </summary>
        /// <param name="appID"></param>
        /// <param name="dataTypeName"></param>
        /// <param name="data"></param>
        /// <returns></returns>
        ResultReturn Export(string appID, string dataTypeName, JObject data);

        /// <summary>
        /// 用于判断当前插件是否能处理指定AppID和指定类型数据
        /// </summary>
        /// <param name="appID"></param>
        /// <param name="dataTypeName"></param>
        /// <returns></returns>
        bool CanHandleWith(string appID, string dataTypeName);
    }
}